<!DOCTYPE html>
<html lang="en">
  <head>
    <title>请假列表</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../static/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/js/elementUI/index.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/js/elementUI/indexfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/js/elementUI/docs.bbc11ec.css"/>
  </head>
  
  <body>
   	<div id="billList" v-cloak>
   			  <el-dialog title="添加请假单"  :visible.sync="dialogVisible">
   			  	 <el-form ref="form" :model="leaveBill" :rules="rules" label-width="80px">
   			  	 	<el-form-item label="请假天数" prop="days">
					    <el-input  v-model.number="leaveBill.days"></el-input>
					</el-form-item>
					<el-form-item label="请假原因" prop="content">
					    <el-input type="textarea" :rows="4" v-model="leaveBill.content"></el-input>
					</el-form-item>
					<el-form-item label="备注">
					    <el-input type="textarea" :rows="4" v-model="leaveBill.remark"></el-input>
					</el-form-item>
				 </el-form>
				  <span slot="footer" class="dialog-footer">
				    <el-button @click="dialogVisible = false">取 消</el-button>
				    <el-button type="primary" @click="addLeaveBill('form')">确 定</el-button>
				  </span>
   			  </el-dialog>
   			 <el-row type="flex" justify="left" >
   			 	 <el-col :offset="1" :xs="12" :sm="6" :md="4" :lg="3">
                        <el-button type="primary" @click="showaddLeaveBill">新增</el-button>
                 </el-col>
   			 </el-row>
   		    <el-row type="flex" justify="center" style="margin-top:10px;">
			<el-col :span="24">
				<div class="grid-content bg-purple">
					<template> 
						<el-table :data="tableData" :border="true" style="width:100%" :fit="true"> 
							<el-table-column prop="id" show-overflow-tooltip label="id"></el-table-column>
							<el-table-column prop="days" show-overflow-tooltip label="天数"></el-table-column>
							<el-table-column prop="content" show-overflow-tooltip label="内容"></el-table-column>
							<el-table-column prop="remark" show-overflow-tooltip label="备注"></el-table-column>
							<el-table-column prop="leveDate" :formatter="dateFormat" show-overflow-tooltip label="时间"></el-table-column>
							<el-table-column label="操作" show-overflow-tooltip> 
								<template scope="scope"> 
								<el-button size="small" v-if="scope.row.state == 0" type="info" @click="applyBill(scope.row)">申请</el-button>
								<el-button size="small" v-if="scope.row.state == 1" type="info" @click="viewBill(scope.row)">查看审批</el-button>  
								<el-button size="small" v-if="scope.row.state == 0" type="danger" @click="deleteBill(scope.row)">删除</el-button>
								<el-button size="small" v-if="scope.row.state == 2" type="danger" >已完成</el-button> 
								</template> 
							</el-table-column>
						</el-table> 
				   </template>
				</div>
			</el-col> 
	   </el-row>
   	</div>
  </body>
  <script src="../../static/js/lib/require.js" type="text/javascript" charset="utf-8"></script>
  <script src="../../static/js/require-config.js" type="text/javascript" charset="utf-8"></script>
  <script src="../../static/js/leaveBill/leaveBill.js" type="text/javascript" charset="utf-8"></script>
</html>
